<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateVideoFilesTransactionTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('video_files_transaction', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('author_id')->comment('创建人');
            $table->unsignedInteger('config_id')->nullable()->commnet('所属服务id');
            $table->string('name')->comment('文件名');
            $table->string('path', 100)->comment('url路径');
            $table->string('file_path', 100)->comment('存储路径');
            $table->unsignedInteger('size')->comment('文件大小');
            $table->string('mime_type', 32)->comment('文件类型');
            $table->boolean('is_upload')->comment('是否上传云服务');
            $table->boolean('status')->comment('状态');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('video_files_transaction');
    }
}
